import request from '@/config/axios'

export const getCustomerListByIdentity = async (params) => {
  return await request.getDYXT({
    url: '/account-authorize/get-customer-list-by-identity',
    params
  })
}

export const getSaleCustomerAddressPage = async (params) => {
  return await request.getOriginalDYXT({
    url: '/sale-customer-address/page',
    params
  })
}

export const addSaleCustomerAddress = async (data) => {
  return await request.postOriginalDYXT({
    url: '/sale-customer-address/add',
    data
  })
}

export const updateSaleCustomerAddress = async (data) => {
  return await request.putOriginalDYXT({
    url: '/sale-customer-address/update',
    data
  })
}

export const getSaleCustomerAddressById = async (id) => {
  return await request.getDYXT({
    url: `/sale-customer-address/getById/${id}`
  })
}

export const deleteSaleCustomerAddress = async (id) => {
  return await request.deleteOriginalDYXT({
    url: `/sale-customer-address/delete/${id}`
  })
}

export const getRegionCnById = async (id) => {
  return await request.getDYXT({
    url: `/regionCn/find-id/${id}`
  })
}
